home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9242 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: krel.iea.com!usenet
  2. From: fleckm@comtch.iea.com@iea.com
  3. Newsgroups: comp.lang.c
  4. Subject: Multi file projects
  5. Date: 8 Mar 1996 22:08:09 GMT
  6. Organization: CompuTech
  7. Message-ID: <4hqb49$nrm@krel.iea.com>
  8. Reply-To: fleckm@comtch.iea.com
  9. NNTP-Posting-Host: cda0-13.iea.com
  10. X-Newsreader: IBM NewsReader/2 v1.2
  11.  
  12.     I would appreciate guidance on constructing a multi file project.  I am using BC++4.5. 
  13. I have a project that is becoming rather large and I would like to break it into
  14. more managable pieces.
  15.     In my main module, I have include a header file which declares two structs,
  16. several floats and ints, a few strings and chars and function prototypes for global use. 
  17.  I  then included the seperate modules.  For instance, I have a module called myscan().
  18. The function prototype is include as myscan.h and the function itself as myscan.c  I 
  19. have been able to seperate myscan as a stand alone compilable program.  I added it 
  20. as a "node" using the Borland IDE.  I include myscan.h in with my main module so 
  21. myscan could be called.  But I get a duplicate function defintion error.  If I do not
  22. include myscan.h from main, I get an undefined symbol error.  
  23.     So, what is the correct procedure so I can break up my program into
  24. managable chunks so that they can be seperately compiled and then linked?
  25. Mike from Coeur d'Alene
  26.  
  27.  
  28.